package main

import "fmt"

/*
知识点二：7-defer 和 return 谁先谁后
*/
func degerFunc() int {
	fmt.Println("7-defer func called...")
	return 0
}

func returnFunc() int {
	fmt.Println("return func called...")
	return 0
}

func returnAndDefer() int {
	defer degerFunc()

	return returnFunc()
}

func main() {
	returnAndDefer()
}
